<%@include file="/header.jsp" %>
<c:url value="/customer/MyAccount" var="myAccountUrl" />


<div id="breadcrump">
    <ul id="breadcrump-list">
        <li>&raquo; <a href="${myAccountUrl}">Mijn account</a> &raquo; Order historie</li>
    </ul>
</div>

<table border="1">
    <tr>
        <th>Besteldatum</th>
        <th>Bestelnummer</th>
        <th>Bestelstatus</th>
    </tr>
    <c:forEach var="order" items="${orders}">
        <c:url var="orderDetailsUrl" value="/customer/OrderDetails">
            <c:param name="order_id" value="${order.id}" />
        </c:url>
        
        <tr>
            <td><fmt:formatDate value="${order.date}" type="date" pattern="dd-MM-yyyy"/></td>
            <td>${order.id}</td>
            <td>${order.orderStatus}</td>
            <td><a href="${orderDetailsUrl}">Details</a></td>
        </tr>
    </c:forEach>
</table>
<a href="${myAccountUrl}">Terug</a>

<%@include file="/footer.jsp" %>